package com.albaba.designpattern.mediator.text_001;

/**
 * @Description: TODO
 * @Author zx
 * @Date 2025/3/3 16:38
 * @Version 1.0
 */
public class Client {

    public static void main(String[] args) {

        // 创建中介者
        MediatorImpl mediator = new MediatorImpl();
        // 创建同事对象
        ConcreteColleagueA concreteColleagueA = new ConcreteColleagueA(mediator);
        ConcreteColleagueB concreteColleagueB = new ConcreteColleagueB(mediator);
        concreteColleagueA.exec("A");
        concreteColleagueB.exec("B");
    }
}
